Order information

This request allows to obtain information about the order.

Request syntax

GET http://b2b-api.go.yandex.ru/integration/2.0/orders/info?order_id={order ID} 

Request headers

  • Authorization: Bearer <OAuth-token>
    OAuth access token. The steps to get a token are described in Getting started.
  • X-YaTaxi-Selected-Corp-Client-Id — client ID from the account. Required if multiple clients are available using the token.
  • Accept-Language: set language as a string (ru, en, fr, hy, he, etc.)

Request parameters

This request has one required parameter:

  • order_id: ID of the order to provide information about.

Response fields description

The response may contain the following fields:

Field Description Format
id Order ID. String
user_id User ID. String
class Tariff name. String
status Order status. String
due_date Date and time when the ride started. Value format: YYYY-MM-DDThh:mm:ss±hhmm String
finished_date Date and time when the ride ended. Is returned only for completed orders. Value format: YYYY-MM-DDThh:mm:ss±hhmm String
performer Information about the car and the driver. Object
source Starting route point. Object
interim_destinations Transitional route points. Object
destination Route destination point. Object
cancel_rules Rules of cancelling the order. Object
cost The cost of the trip and the toll road (if any was included in the order) without VAT. Is returned only for completed orders. Number
cost_with_vat The cost of the trip and the toll road (if any was included in the order) with VAT. Is returned only for completed orders. Number
cost_center_values New fields for cost centers. Array of objects
toll_roads Toll roads. Object

Structure of the performer array element:

Field Description Format
vehicle Information about the car. Object
fullname Driver’s full name. String
phone Driver’s phone number. String

Structure of the vehicle object:

Field Description Format
model The model of the car. String
number The plate number of the car. String
color The color of the car. String

Structure of the source-destination object:

Field Description Format
geopoint An array of two values that determine the latitude and longitude of the point. Array
fullname Point name. String

Structure of the cancel_rules object:

Field Description Format
can_cancel Whether it’s possible to cancel the order. Boolean
message Text description of the order cancellation rules. String
state Current status of the possibility to cancel the order. String
title Cancellation rule name. String

Structure of the cost_center_values array element:

Field Description Format
id Cost center field ID. String
title Cost center field name. String
value New field value. String

Structure of the toll_roads element:

Field Description Format
user_chose_toll_road The user has chosen a toll road. Boolean
user_had_choice The user had a choice (there was a free alternative). Boolean
auto_payment Payment of a toll road for a corporate account. Boolean

Request example

GET http://b2b-api.go.yandex.ru/integration/2.0/orders/info?order_id=885...7f2e 
... 
Authorization: Bearer <OAuth-token>
X-YaTaxi-Selected-Corp-Client-Id: <client-id> 

Response example

Response example for an active order:

{
  "id": "885e440dc70acc3bb6ce0cc5c67d7f2e",
  "user_id": "5769a1d0ed084122a5ff50d67941edc8",
  "class": "econom",
  "status": "driving",
  "due_date": "2023-02-10T10:54:55+03:00",
  "performer": {
    "vehicle": {
      "model": "Nissan Qashqai",
      "number": "B746YO777",
      "color": "green"
    },
    "fullname": "Sazonov Stanimir Matveyevich",
    "phone": "+79120995513,,95576"
  },
  "source": {
    "fullname": "Moscow, Zoologicheskaya St., 28 bld 1",
    "geopoint": [
      37.58508433837886,
      55.76631637044709
    ]
  },
  "destination": {
    "fullname": "Moscow, Godovikova, 9 bld 1",
    "geopoint": [
      37.62525310058589,
      55.80713497241309
    ]
  },
  "cancel_rules": {
    "can_cancel": true,
    "message": "At the moment cancellation is free. After the driver arrives, it might not be.",
    "state": "free",
    "title": "Free cancellation"
  },
  "cost_center_values": [
    {
      "id": "cost_center",
      "title": "Trip goal",
      "value": ""
    }
  ],
  "toll_roads": {
    "user_chose_toll_road": true,
    "user_had_choice": true,
    "auto_payment": true
  }
}

Response example for a completed order:

{
  "id": "885e440dc70acc3bb6ce0cc5c67d7f2e",
  "user_id": "5769a1d0ed084122a5ff50d67941edc8",
  "class": "econom",
  "status": "complete",
  "due_date": "2023-02-10T10:54:55+03:00",
  "finished_date": "2023-02-10T11:14:16.037000+03:00",
  "performer": {
    "vehicle": {
      "model": "Nissan Qashqai",
      "number": "B746YO777",
      "color": "green"
    },
    "fullname": "Sazonov Stanimir Matveyevich"
  },
  "source": {
    "fullname": "Moscow, Zoologicheskaya St., 28 bld 1",
    "geopoint": [
      37.58508433837886,
      55.76631637044709
    ]
  },
  "destination": {
    "fullname": "Moscow, Godovikova, 9 bld 1",
    "geopoint": [
      37.62525310058589,
      55.80713497241309
    ]
  },
  "cost": 2188,
  "cost_with_vat": 2625.6,
  "cost_center_values": [
    {
      "id": "cost_center",
      "title": "Trip goal",
      "value": ""
    }
  ],
  "toll_roads": {
    "user_chose_toll_road": true,
    "user_had_choice": true,
    "auto_payment": true
  }
}

Response codes

The response to this request may contain the following HTTP codes:

  • 200: Request completed successfully.
  • 403:
    • SELECT_CLIENT_HEADER_REQUIRED: the request did not pass the header X-YaTaxi-Selected-Corp-Client-Id (returned if more than one client is available for the token).
    • SELECTED_CLIENT_ACCESS_DENIED: the header X-YaTaxi-Selected-Corp-Client-Id contains the client's ID, which this login does not have access to.
  • 404: Requested entry not found.